#define _CRT_SECURE_NO_WARNINGS 1
#include<vector>
#include<iostream>
using namespace std;

void TestVectorExpand()
{
	size_t sz;
	vector<int> v;
	v.reserve(100);
	sz = v.capacity();
	cout << "capacity changed: " << sz << '\n';
	cout << "making v grow:\n";
	for (size_t i = 0; i < 100; i++)
	{
		v.push_back(i);
		if (sz != v.capacity())
		{
			sz = v.capacity();
			cout << "capacity changed: " << sz << '\n';
		}
	}
}

void test_vector1()
{
	vector<int> v1;
	vector<int> v2(3, 6);
	vector<int> v3(++v2.begin(), v2.end());
	vector<int> v4(v3);
	//for (size_t i = 0; i < v2.size(); i++)
	//{
	//	cout << v2[i] << " ";
	//}
	//vector<int>::iterator it = v2.begin();
	//while (it != v2.end())
	//{
	//	cout << *it << " ";
	//	++it;
	//}
	//cout << endl;
	//for (auto e : v2)
	//{
	//	cout << e << " ";
	//}
	cout << endl;
}

void test_vector2()
{
	//vector<int> v1(3,6);
	//v1.resize(4, 1);
	//v1.resize(5);
	//for (auto e : v1)
	//{
	//	cout << e << " ";
	//}
	//cout << endl;
	//vector<int> v1(3, 6);
	//cout << v1.size() << endl;
	//cout << v1.capacity() << endl;
	//v1.resize(4);
	//cout << v1.size() << endl;
	//cout << v1.capacity() << endl;
	vector<int> v1;
	vector<int> v2(3, 6);
	cout << v1.empty() << endl;
	cout << v2.empty() << endl;
}

void test_vector3()
{
	vector<int> v(10, 1);
	v.reserve(20);
	cout << v.size() << endl;
	cout << v.capacity() << endl;

	v.reserve(15);
	cout << v.size() << endl;
	cout << v.capacity() << endl;

	v.reserve(5);
	cout << v.size() << endl;
	cout << v.capacity() << endl;
}

void test_vector4()
{
	//vector<int> v(10, 1);
	//v.reserve(20);
	//cout << v.size() << endl;
	//cout << v.capacity() << endl;

	//v.shrink_to_fit();
	//cout << v.size() << endl;
	//cout << v.capacity() << endl;
	// 
	//vector<int> v(3, 6);
	//v.assign(6, 8);
	//for (auto ch : v)
	//{
	//	cout << ch << " ";
	//}
	// 
	//vector<int> v(10,1);
	//v.insert(v.begin(), 0);
	//for (auto ch : v)
	//{
	//	cout << ch << " ";
	//}
	//cout << endl;
	//v.insert(v.begin() + 1, 6);
	//for (auto ch : v)
	//{
	//	cout << ch << " ";
	//}
	//cout << endl;
	//vector<int> v(3, 6);
	//cout << v.size() << endl;
	//cout << v.capacity() << endl;
	//v.clear();
	//cout << v.size() << endl;
	//cout << v.capacity() << endl;
	//vector<int> v(3, 6);
	//v.clear();
	//int x;
	//cin >> x;
	//v.push_back(x);
	vector<int> v(10, 0);
	for (size_t i = 0; i < 10; i++)
	{
		cin >> v[i];
	}
}

int main(void)
{
	test_vector4();
	
	return 0;
}